/**
 * 报表设计公司(2011)
 */
package com.reportgear.designer.view.menu;

import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;

import com.reportgear.designer.action.edit.ClearValueAction;
import com.reportgear.designer.action.style.GlobalStyleAction;
import com.reportgear.report.model.cell.value.FormulaObject;
import com.reportgear.report.model.cell.value.JsDataFieldObject;
import com.reportgear.report.model.cell.value.salary.SalaryDetailObject;
import com.reportgear.report.model.cell.value.salary.SalaryDocObject;
import com.reportgear.report.model.cell.value.salary.SalaryFormulaObject;
import com.reportgear.report.model.cell.value.salary.SalaryItemObject;
import com.reportgear.report.model.cell.value.salary.SalaryObject;
import com.reportgear.report.model.cell.value.salary.SalaryPayObject;
import com.reportgear.report.view.grid.editor.CellEditorManager;

/**
 * Grid弹出菜单
 * 
 * @version 1.0 2011-3-18
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since ANNCSR 2.0
 */
public class GridPopupMenu extends JPopupMenu {
	public GridPopupMenu() {
		CellEditorManager manager = CellEditorManager.INSTANCE;

		this.add(new JMenuItem(manager.getCellAction(String.class)));
		this.addSeparator();
		this.add(new JMenuItem(manager.getCellAction(SalaryObject.class)));
		this.add(new JMenuItem(manager.getCellAction(SalaryDetailObject.class)));
		this.addSeparator();
		this.add(new JMenuItem(manager.getCellAction(SalaryItemObject.class)));
		this.add(new JMenuItem(manager.getCellAction(SalaryFormulaObject.class)));
		this.add(new JMenuItem(manager.getCellAction(SalaryDocObject.class)));
//		this.addSeparator();
//		this.add(new JMenuItem(manager.getCellAction(SalaryMainObject.class)));
//		this.add(new AddSalaryMainObjectAction());
		this.addSeparator();
		this.add(new JMenuItem(manager.getCellAction(SalaryPayObject.class)));
		this.addSeparator();
		this.add(new JMenuItem(manager.getCellAction(FormulaObject.class)));
		this.addSeparator();
		this.add(new JMenuItem(manager.getCellAction(JsDataFieldObject.class)));
		this.addSeparator();
		this.add(new JMenuItem(new ClearValueAction()));
		this.addSeparator();
		this.add(new GlobalStyleAction());

	}
}
